package com.rednote.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
/**
 * <p>
 * 用户帖子评分表
 * </p>
 *
 * @author ysx
 * @since 2025-06-19
 */
@Getter
@Setter
@TableName("user_post_rating")
public class UserPostRating implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 自增主键ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 帖子ID
     */
    private Long postId;

    /**
     * 评分值
     */
    private Integer value;

    public UserPostRating(Long userId, Long postId, Integer value) {
        this.userId = userId;
        this.postId = postId;
        this.value = value;
    }

    @Override
    public String toString() {
        return "UserPostRating{" +
                "userId=" + userId +
                ", postId=" + postId +
                ", ratingValue=" + value +
                '}';
    }
}
